package commandDemo;

import commandDemo.impl.GarageDoor;

/****
 * 命令对象
 */
public class GarageDoorOpenCommand implements Command{
    private final GarageDoor garageDoor;

    public GarageDoorOpenCommand(GarageDoor garageDoor) {
        this.garageDoor = garageDoor;
    }

    @Override
    public void execute() {
        garageDoor.lightOn();
    }
}
